/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.artezio.buyndrive.service.impl;

import com.artezio.buyndrive.dao.CityDAO;
import com.artezio.buyndrive.domain.City;
import com.artezio.buyndrive.domain.Country;
import com.artezio.buyndrive.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author vgordievich
 */
@Service
public class CityServiceImpl extends AbstractService<City, CityDAO>
        implements CityService {

    @Autowired
    @Override
    public void setDao(CityDAO dao) {
        super.dao = dao;
    }

    @Autowired
    private CityDAO cityDAO;

    @Override
    @Transactional
    public List getCitiesByCountID(Country country) {
        return cityDAO.getCitiesByCountID(country);
    }

}
